//-------------------------------------------------------------------
//	Copyright (c) 2010-2014  Zhirnov Andrey
//	This file is part of the "UX Standard Lib" project.
//	See copyright notice in "UX_STL_Core.h".
//-------------------------------------------------------------------

#ifndef _UXS_TYPE_DEFINES_H
#define _UXS_TYPE_DEFINES_H

#pragma once

// C++11 style enum
// TODO: operators
#define UX_ENUM_CPP11( _name, ... ) \
	struct _name \
	{ \
	public: \
		enum __type { \
			__VA_ARGS__ \
		}; \
		\
	private: \
		__type	_value; \
		\
	public: \
		_name () : _value(__type(0)) {} \
		_name (__type value) : _value(value) {} \
		\
		operator __type   () const		{ return _value; } \
		operator __type & ()			{ return _value; } \
	}


#endif	// _UXS_TYPE_DEFINES_H